Field of the Invention
This invention relates to a transmitting apparatus and to a method of controlling the flow thereof. More particularly, the invention relates to a transmitting apparatus, and to a flow control method thereof, through which an externally entered flow-control-related frame (a frame requesting start of flow control and a frame requesting halt of flow control) is allowed to pass without being processed and an external device such as a router is allowed to execute flow control.
A recent market trend is greater use of low-cost GbE (Gigabit Ethernet) for transmission of gigabit-class data. If GbE is used for routers or the like, there is an increase in requests for connection by GbE to SONET (Synchronous Optical Network) transmitters that construct a wide-area network connected to the router. It is desired to make the SONET transmitter appear as an SW-HUB as seen from the router and to make the connection between remote routers appear as if it were constructed by an Ethernet network. A technique provided to achieve this is to place a MAC frame, which is used in Ethernet, on a SONET. Simply stated, the above is achieved by encapsulating the MAC frame in a PPP (Point-to-Point Protocol) frame used in SONET.
Ethernet and SONET are different culturally and the definition of data transmission speed over these networks is 10/100/1000 (Mbps) in case of Ethernet and 55/155/622/2488 (Mbps) in case of SONET. If it is attempted to exchange data between networks that thus differ in transmission speed, e.g., if an attempt is made to use OC12 (622 Mbps) to connect a 1-Gbps Ethernet to a SONET, the band is limited to about 400 Mbps because a transmission band of only 622 Mbps is available with respect to the input of 1 Gbps. An operation for limiting this band shall be referred to as “band control” below.
In a case where band control is applied, a large-capacity buffer is provided for temporarily accumulating the entered data (frame) in such a manner that the data will not be discarded. In addition, it is necessary to provide a flow control function in which when the buffer is about to overflow, the external device to which the data is input is requested to halt the transfer of the data. By way of example, IEEE 802.3x provides for such flow control. When it is required to halt the transfer of data between connected devices, IEEE 802.3x prevents the inflow of excessive data by outputting a special frame, called a PAUSE frame, to the device on the other end. Further, since frame control itself halts the flow of data, it is necessary that the device that receives the PAUSE frame buffer data until the transfer of data is resumed. Furthermore, it is necessary to request the sender of this data to halt the output of the PAUSE frame as necessary. In summary, therefore, a large-capacity buffer for band control and flow control is provided in ordinary circumstances and, if the buffer is about to overflow owing to band control or the like, transfer of data is controlled by using flow control such as the PAUSE frame with respect to the sender of the data. In other words, flow control is executed between the router and the transmitting apparatus.
FIG. 7 is a block diagram showing part of a transmitting system useful in describing flow control according to the prior art. The system includes routers 10, 20 and SONET transmitters 30, 40. The routers are connected to the transmitters by a high-speed Ethernet, e.g., GbE, and the transmitters are connected to each other by an OC12 optical transmission line constructing a SONET. The router 10 has fast Ethernet ports 11a, 11b, . . . and is connected to the high-speed Ethernet via these ports. The router 10 further includes a switch 12 for sending a frame (a MAC frame) by routing it to a prescribed network using a routing table or filtering table, not shown. The fast Ethernet port 11b is provided with an input buffer 13, an output buffer 14 and a band control/flow control unit, which is not shown.
The transmitter 30 has a buffer & band controller 31, a MAC frame terminating/discriminating unit 32, a PPP & SONET unit 33, a switch 34 for performing STS switching, an OC12 interface 35 and a buffer & MAC frame creation unit 36.
The buffer & band controller 31 successively stores IEEE 802.3 MAC frames, which enter from the router, in an internal buffer 31a for band control/pause control, as shown in FIG. 8, reads data out of this buffer at a speed that conforms to OC12, and inputs this data to the MAC frame terminating unit 32. As shown in FIG. 9, the IEEE 802.3 MAC frame is composed of (1) a preamble Prea− for establishing synchronization, (2) a frame start limiter SFD, (3) a destination address DA, (4) a source address SA, (5) a logical link control header LLC, (6) a subnetwork access protocol header SNA, (7) an IP header IP, (8) data (information) and (9) a frame check sequence FCS. By making the destination address DA a special code, the MAC frame can be made a frame (Pause-In Frame) PI that requests start of flow control and a frame (Pause-Out Frame) PO that requests halt of flow control.
The buffer & band controller 31 has a band controller 31b for monitoring the amount of data accumulated in the buffer 31a, instructing the buffer & MAC frame creation unit 36 to create the frame PI for requesting start of flow control if the amount of data accumulated exceeds a first set value, and instructing the buffer & MAC frame creation unit 36 to create the frame PO for requesting halt of flow control if the amount of data accumulated is less than a second set value (which is smaller than the first set value).
The frame terminating/discriminating unit 32 has a MAC frame termination 32a for terminating the MAC frame upon deleting the preamble Prea− and start frame limiter SFD from the data read out of buffer 31a, a pause-frame discriminator 32b for discriminating the pause-in frame (the frame that requests the start of flow control) PI and the pause-out frame (the frame that requests halt of flow control) PO, instructing the buffer & MAC frame creation unit 36 to halt transmission of the MAC frame if the PI frame is detected and instructing the buffer & MAC frame creation unit 36 to start transmission of the MAC frame if the PO frame is detected.
The PPP & SONET unit 33 adds, e.g., a PPP (Point-to-Point Protocol) header onto the MAC frame that enters from the frame terminating/discriminating unit 32, thereby obtaining an RFC1662 frame (see FIG. 10), assembles this into a packet, which is the unit of switching in the STS (Synchronous Transfer Structure) switch 34 of the next stage, and outputs the result. The PPP & SONET unit 33 deletes the PPP header and footer from the packet that enters from the STS switch 34 and inputs the result to the buffer & MAC frame creation unit 36. The RFC1662 frame has a structure the same as that of an unnumbered information frame of an HDLC, as shown in FIG. 10. More specifically, the RFC1662 frame is obtained by adding an HDLC header and a protocol number Protoc onto the MAC frame and adding on an HDLC footer as the footer. The HDLC header includes a flag sequence Flag, an address portion ADD and a control portion Control, and the HDLC footer includes a frame check sequence FCS and a flag sequence Flag. The protocol number Protoc indicates the protocol number of (1) a network layer protocol (Internet Protocol, AppleTalk, etc.), (2) a network control protocol (IPCP, ATCP, etc.) and (3) a data-link control protocol (Link Control Protocol, Password Authentication Protocol, etc.), etc.
The OC12 interface 35 sends each packet that enters from the STS switch 34 to the optical transmission line upon mapping the packet to the payload of an OC12 optical synchronization frame (POS: Packet Over Sonet), and demaps a frame, which is the unit of switching of the STS switch, from the payload of a POS-format OC12 optical synchronization frame that enters from the optical transmission line and outputs the result.
As shown in FIG. 8, the buffer & MAC frame creation unit 36 has a large-capacity buffer 36a, a pause-frame creation unit 36b, a MAC-frame creation unit 36c and a combiner 36d. The large-capacity buffer 36a buffers data that enters from the PPP & SONET unit 33, and the pause-frame creation unit 36b creates the pause-in frame (the frame that requests the start of flow control) PI and the pause-out frame (the frame that requests halt of flow control) PO based upon a command from the band controller 31b. The MAC-frame creation unit 36c reads data out of the buffer 36a successively at a speed that conforms to the high-speed Ethernet, creates an IEEE 802.3 MAC frame and outputs the frame. Further, the MAC-frame creation unit 36c controls the creation/transmission of the MAC in accordance with a command from the pause-frame discriminator 32b. The combiner 36d combines the frames created by the pause-frame creation unit 36b and MAC-frame creation unit 36c and sends the result to the high-speed Ethernet.
Flow Control
The band controller 31b of the buffer & band controller 31 monitors the amount of data accumulated in the buffer 31a and instructs the buffer & MAC frame creation unit 36 to perform PI frame creation if the amount of MAC frame inflow from the router 10 increases and the amount of accumulated data exceeds the first set value. In response, the pause-frame creation unit 36b of the buffer & MAC frame creation unit 36 creates the PI frame and sends it to the router 10.
Upon detecting the PI frame, the router 10 halts the transmission of the MAC frame to the transmitter 30. As a result, the amount of data accumulated in the buffer 31a of transmitter 30 decreases. If the amount of accumulated data falls below the second set value, the band controller 31b instructs the buffer & MAC frame creation unit 36 to create the PO frame. In response, the buffer & MAC frame creation unit 36 creates the PO frame and sends it to the router 10. Upon detecting the PO frame, the router 10 starts sending the MAC frame to the transmitter 30.
If the amount of data accumulated in the buffer 13 exceeds the first set value, the router 10 sends the PI frame to the transmitter 30. Upon discriminating the PI frame, the pause-frame discriminator 32b of the frame terminating/discriminating unit 32 in transmitter 30 instructs the buffer & MAC frame creation unit 36 to stop sending the MAC frame. As a result, the buffer & MAC frame creation unit 36 halts the transmission of the MAC frame to the router 10 and buffers the data that enters from the PPP & SONET unit 33 in the large-capacity buffer 36a. 
If as a result of the foregoing operation the amount of data that has accumulated in the buffer 13 of router 10 decreases and falls below the second set value, the router 10 creates the PO frame and sends this frame to the transmitter 30. Upon discriminating the PO frame, the pause-frame discriminator 32b of the frame terminating/discriminating unit 32 in the transmitter 30 instructs the buffer & MAC frame creation unit 36 to start sending the MAC frame. As a result, the buffer & MAC frame creation unit 36 resumes the creation of the MAC frame and the transmission of the MAC frame to the router 10.
There is now demand for a reduction in the scale of the circuitry constructing the transmitting apparatus. This is being achieved by minimizing the capacity of the buffer 36a in the buffer & MAC frame creation unit 36. If the capacity of the buffer 36a is minimized, however, a situation arises in which the data that enters from the PPP & SONET unit 33 can no longer be stored in the buffer 36a from the moment the transmission of the MAC frame is halted by the PI frame from the router 10 to the moment the transmission of the MAC frame is resumed by the PO frame. The result is that this data will be discarded. Even when flow control is carried out in the above-described manner, the discarding of data cannot be prevented if the buffer capacity is too small.